import UnityEngine

class Sick(MonoBehaviour):
    flutime as single = 0.0 # time since infection
    fludex = 0
    
    public range = 10.0
    public explode as (single)
    
    def OnEnable():
        flutime = 0.0
        fludex = 0
    
    def Update():
        if flutime > explode[fludex]:
            fludex += 1
            
            hits = Physics.OverlapSphere(transform.position, range)
            for h in hits:
                hitbox = h.GetComponent(HitBox)
                if hitbox:
                    hitbox.Infect(Sick)
    
